import {
	apiResquest
} from './http.js'

//////////////////////////////////////////index 首页//////////////////////////////////////////////////////


//获取微信AppId
export const appid = (query) => {
	return apiResquest({
		url: 'h5/index/appid',
		method: 'GET',
		query: {
			...query
		}
	})
}

//获取店铺列表
export const getStoreList = (query) => {
	return apiResquest({
		// url:'h5/index/getStoreList',
		url: 'xcxuser/index/getStoreList',
		method: 'GET',
		query: {
			...query
		}
	})
}

export const getStoreDetail = (query) => {
	return apiResquest({
		// url: 'h5/index/getStoreDetail',
		url: 'xcxuser/index/getStoreDetail',
		method: 'GET',
		query: {
			...query
		}
	})
}
//微信配置
export const getWxConfig = (query) => {
	return apiResquest({
		url: 'h5/index/getWxConfig',
		method: 'GET',
		query: {
			...query
		}
	})
}
//使用说明
export const explain = (query) => {
	return apiResquest({
		url: 'h5/index/explain',
		method: 'GET',
		query: {
			...query
		}
	})
}

//首页数据加载
export const getIndexData = (query) => {
	return apiResquest({
		// url:'h5/index/index',
		url: 'xcxuser/index/index',
		method: 'GET',
		query: {
			...query
		}
	})
}

//获取店铺分类
export const getStoreCat = (query) => {
	return apiResquest({
		url: 'h5/index/getStoreCat',
		method: 'GET',
		query: {
			...query
		}
	})
}

//获取店铺标识
export const getTagInfo = (query) => {
	return apiResquest({
		url: 'h5/index/getTagInfo',
		method: 'GET',
		query: {
			...query
		}
	})
}



//////////////////////////////////////////user 会员//////////////////////////////////////////////////////


//获取会员登录状态信息
export const checkIsLogin = (query) => {
	return apiResquest({
		url: 'xcxuser/user/islogin',
		method: 'GET',
		query: {
			...query
		}
	})
}
//获取会员信息
export const getVipInfo = (query) => {
	return apiResquest({
		// url:'h5/user/vip',
		url: 'xcxuser/user/vip',
		method: 'GET',
		query: {
			...query
		}
	})
}
//获取会员收款码
export const getShoukuan = (query) => {
	return apiResquest({
		url: 'xcxuser/user/getShoukuan',
		method: 'POST',
		query: {
			...query
		}
	})
}
//获取会员主页
export const getUserIndex = (query) => {
	return apiResquest({
		// url:'h5/user/index',
		url: 'xcxuser/user/index',
		method: 'GET',
		query: {
			...query
		}
	})
}
//保存收款码
export const shoukuanSubmit = (query) => {
	return apiResquest({
		url: 'xcxuser/user/shoukuanSubmit',
		method: 'POST',
		query: {
			...query
		}
	})
}
//我的饭票
export const getRevenueRecord = (query) => {
	return apiResquest({
		url: 'xcxuser/user/getRevenueRecord',
		method: 'POST',
		query: {
			...query
		}
	})
}
//我的饭票明细
export const getRebateLog = (query) => {
	return apiResquest({
		url: 'xcxuser/user/getRebateLog',
		method: 'POST',
		query: {
			...query
		}
	})
}

//我的团队记录
export const getCommissionRecord = (query) => {
	return apiResquest({
		url: 'h5/user/getCommissionRecord',
		method: 'GET',
		query: {
			...query
		}
	})
}
//我的佣金明细
export const getCommissionLog = (query) => {
	return apiResquest({
		url: 'h5/user/getCommissionLog',
		method: 'GET',
		query: {
			...query
		}
	})
}
//可提现佣金
export const getMyCommission = (query) => {
	return apiResquest({
		url: 'h5/user/getMyCommission',
		method: 'GET',
		query: {
			...query
		}
	})
}

//提现申请
export const cashApply = (query) => {
	return apiResquest({
		url: 'xcxuser/user/cashApply',
		method: 'POST',
		query: {
			...query
		}
	})
}

//会员购买支付
export const vipbuy = (query) => {
	return apiResquest({
		// url:'h5/user/vipbuy',
		url: 'xcxuser/user/vipbuy',
		method: 'POST',
		query: {
			...query
		}
	})
}

//报名购买支付
export const signbuy = (query) => {
	return apiResquest({
		// url: 'h5/user/signbuy',
		url: 'xcxuser/user/signbuy',
		method: 'POST',
		query: {
			...query
		}
	})
}
//获取团队成员
export const getTeamUser = (query) => {
	return apiResquest({
		url: 'h5/user/getTeamUser',
		method: 'GET',
		query: {
			...query
		}
	})
}

//收益规则
export const revenueRule = (query) => {
	return apiResquest({
		url: 'h5/user/revenueRule',
		method: 'GET',
		query: {
			...query
		}
	})
}
// 资源配置
export const xcxuserImg = (query) => {
	return apiResquest({
		url: 'xcxuser/index/img',
		method: 'POST',
		query: {
			...query
		}
	})
}

// 霸王餐群二维码

export const apiEwm = (query) => {
	return apiResquest({
		url: 'xcxuser/index/ewm',
		method: 'GET',
		query: {
			...query
		}
	})
}
//收益排行
export const revenueRanking = (query) => {
	return apiResquest({
		url: 'h5/user/revenueRanking',
		method: 'GET',
		query: {
			...query
		}
	})
}

//分销商信息
export const share = (query) => {
	return apiResquest({
		url: 'h5/user/share',
		method: 'GET',
		query: {
			...query
		}
	})
}


//分销商二维码
export const shareQrcode = (query) => {
	return apiResquest({
		// url: 'h5/user/shareQrcode',
		url: 'xcxuser/user/shareQrcode',
		method: 'GET',
		query: {
			...query
		}
	})
}
// 获取手机号
export const getMobile= (query) => {
	return apiResquest({
		url: 'xcxuser/user/getMobile',
		method: 'POST',
		query: {
			...query
		}
	})
}
//分销入驻
export const shareApply = (query) => {
	return apiResquest({
		url: 'h5/user/shareApply',
		method: 'POST',
		query: {
			...query
		}
	})
}
// 用户详情接口
export const userDetail = (query) => {
	return apiResquest({
		url: 'xcxuser/user/userDetail',
		method: 'POST',
		query: {
			...query
		}
	})
}
//商家入驻
export const storeApply = (query) => {
	return apiResquest({
		// url: 'h5/user/storeApply',
		url: 'xcxuser/user/storeApply',
		method: 'POST',
		query: {
			...query
		}
	})
}


//帮助中心
export const help = (query) => {
	return apiResquest({
		// url: 'h5/user/help',
		url: 'xcxuser/user/help',
		method: 'GET',
		query: {
			...query
		}
	})
}

//帮助中心详情
export const helpDetails = (query) => {
	return apiResquest({
		// url: 'h5/user/helpDetails',
		url: 'xcxuser/user/helpDetails',
		method: 'GET',
		query: {
			...query
		}
	})
}
// 资源上传

export const apiUpload = (query) => {
	return apiResquest({
		url: 'xcxuser/index/upload',
		method: 'POST',
		query: {
			...query
		}
	})
}
//反馈提交
export const feedbackSubmit = (query) => {
	return apiResquest({
		// url: 'h5/user/feedbackSubmit',
		url: 'xcxuser/user/feedbackSubmit',
		method: 'POST',
		query: {
			...query
		}
	})
}

//发送验证码
export const send = (query) => {
	return apiResquest({
		url: 'sms/send',
		method: 'POST',
		query: {
			...query
		}
	})
}

//修改手机号
export const changemobile = (query) => {
	return apiResquest({
		url: 'h5/user/changemobile',
		method: 'POST',
		query: {
			...query
		}
	})
}

//获取订单列表
export const getOrderList = (query) => {
	return apiResquest({
		// url: 'h5/user/getOrderList',
		url: 'xcxuser/user/getOrderList',
		method: 'POST',
		query: {
			...query
		}
	})
}

//上传凭证详情
export const getVoucherDetails = (query) => {
	return apiResquest({
		// url: 'h5/user/getVoucherDetails',
		url: 'xcxuser/user/getVoucherDetails',
		method: 'POST',
		query: {
			...query
		}
	})
}

//凭证上传
export const voucherUpload = (query) => {
	return apiResquest({
		url: 'xcxuser/user/voucherUpload',
		method: 'POST',
		query: {
			...query
		}
	})
}
//取消订单
export const ordercancel = (query) => {
	return apiResquest({
		url: 'xcxuser/user/ordercancel',
		method: 'POST',
		query: {
			...query
		}
	})
}
//订单再次支付
export const repay = (query) => {
	return apiResquest({
		// url: 'h5/user/repay',
		url: 'xcxuser/user/repay',
		method: 'POST',
		query: {
			...query
		}
	})
}
//微信登录
export const wxLogin = (query) => {
	return apiResquest({

		// url: 'h5/user/wxLogin',
		url: 'xcxuser/user/login',
		method: 'GET',
		query: {
			...query
		}
	})
}


//退出登录
export const logout = (query) => {
	return apiResquest({
		url: 'h5/user/logout',
		method: 'POST',
		query: {
			...query
		}
	})
}


//保存省市区位置
export const save_addr = (query) => {
	return apiResquest({
		url: 'h5/user/addr',
		method: 'POST',
		query: {
			...query
		}
	})
}